yjx.controller('todoController',['$rootScope','$scope','$fetch','modalService','$state','$timeout',function ($rootScope,$scope,$fetch,modalService,$state,$timeout) {
    $rootScope.tabCtrlName = $rootScope.tabCtrlNameArr[3];
    var shareMsg = "请点击右上角\"...\"完成对客户的转发";
    // var btnValue = "知道了"
    $scope.forward = function (contentId,id,type) {
        //alert(id);
        if(type == 1) {
            $state.go('surDetail',({id:contentId,forwardId:null,pendingEventId:id}))
        } else if(type == 2) {
            $state.go('productDetail',({id:contentId,forwardId:null,pendingEventId:id}))
        }else{
            $state.go('bannerDetail',({id:contentId,forwardId:null,pendingEventId:id}))
        }
    }

    //function getTodoList(){
    //    $fetch.fetch(
    //        '/pendingEvent/list',
    //        {
    //            params:{
    //                userId:$rootScope.userId
    //            },
    //            cache:false,
    //        }
    //    ).then(function(data){
    //            $timeout(function(){
    //                $rootScope.todoList = data
    //                $scope.todoCount =   $rootScope.todoList?$rootScope.todoList.length:0;
    //            })
    //        }).catch(function(e){
    //            modalService.mainMsgError(e.msg);
    //        })
    //}
    //if($rootScope.userId){
    //    getTodoList();
    //}
}])